package ch2;

import java.util.Scanner;
/**
 * @author oldliu
 * @since 1.0
 */
public class Score2 {
    //输入三门课的成绩，求平均分和差
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("请输入java的成绩:");
        int javaScore=in.nextInt();
        System.out.println("请输入Sql成绩:");
        int sqlScore=in.nextInt();
        System.out.println("请输入STB成绩：");
        int stbScore=in.nextInt();
        int avg=(javaScore+sqlScore+stbScore)/3;
        int diff=javaScore-sqlScore;
        System.out.println("三门课平均分是"+avg);
        System.out.println("java和Sql分数差是"+diff);
    }
}
